package com.cabal.job;

import com.cabal.mall.service.CabalMallService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * GM BUFF过期检查
 * 
 * @author SK
 * @date 2024年10月16日
 *
 */
@Component
@Slf4j
public class CabalGmBuffCheckJob {

	@Autowired
	private CabalMallService cabalMallService;

	@Scheduled(cron="${cabal-gm-buff-check-cron:0 0 0/2 * * ?}")   // 每2小时执行一次
	public void updateOnlineUserCash() {
		log.info("GM BUFF定时任务开始......");
		cabalMallService.checkGmBuffJob();
		log.info("GM BUFF定时任务结束......");
	}
}